const CracoLessPlugin = require('craco-less');
const path = require("path");

const resolve = dir => path.resolve(__dirname, dir);

module.exports = {
  // 改变antd主题
  plugins: [{
    plugin: CracoLessPlugin,
    options: {
      lessLoaderOptions: {
        lessOptions: {
          modifyVars: {
            '@primary-color': '#a61ae7' //'#1DA57A'
          },
          javascriptEnabled: true,
        },
      },
    },
  }, ],

  webpack: {
    // 配置别名
    alias: {
      "@": resolve("src"),
      "components": resolve("src/components")
    },
    // 配置默认指定后缀名
    extensions: ['.js', '.jsx', '.json']
  }
}